<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "car".
 *
 * @property integer $c_id
 * @property string $c_name
 * @property integer $b_id
 * @property integer $p_id
 * @property integer $m_id
 * @property string $shangpai_time
 * @property string $mileage
 * @property string $biansu
 * @property string $paifang
 * @property string $shangpai_place
 * @property integer $s_id
 * @property integer $a_id
 * @property integer $master_id
 * @property string $nianjian_time
 * @property string $shangye_time
 * @property integer $guohu
 * @property string $car_desc
 * @property string $car_desx
 */
class Car extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'car';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['b_id', 'p_id', 'm_id', 's_id', 'a_id', 'master_id', 'guohu'], 'integer'],
            [['car_desc'], 'string'],
            [['c_name'], 'string', 'max' => 200],
            [['shangpai_time', 'mileage'], 'string', 'max' => 20],
            [['biansu', 'paifang', 'shangpai_place'], 'string', 'max' => 60],
            [['nianjian_time', 'shangye_time'], 'string', 'max' => 50],
            [['car_desx'], 'string', 'max' => 255]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'c_id' => 'C ID',
            'c_name' => 'C Name',
            'b_id' => 'B ID',
            'p_id' => 'P ID',
            'm_id' => 'M ID',
            'shangpai_time' => 'Shangpai Time',
            'mileage' => 'Mileage',
            'biansu' => 'Biansu',
            'paifang' => 'Paifang',
            'shangpai_place' => 'Shangpai Place',
            's_id' => 'S ID',
            'a_id' => 'A ID',
            'master_id' => 'Master ID',
            'nianjian_time' => 'Nianjian Time',
            'shangye_time' => 'Shangye Time',
            'guohu' => 'Guohu',
            'car_desc' => 'Car Desc',
            'car_desx' => 'Car Desx',
        ];
    }
}
